package com.atguigu.wordcount.outputformat;

import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.io.NullWritable;

import org.apache.hadoop.mapreduce.RecordWriter;
import org.apache.hadoop.mapreduce.TaskAttemptContext;
import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat;
import org.apache.hadoop.util.Progressable;

import java.io.IOException;

/**
 * @ClassName MyOutoutFormat
 * @DeScription MyOutoutFormat
 * @Author 剧情再美终是戏
 * @Date 2019/11/19 18:38
 * @Version 1.0
 **/
public class MyOutoutFormat extends FileOutputFormat<String, NullWritable> {


    public RecordWriter<String, NullWritable> getRecordWriter(TaskAttemptContext context) throws IOException, InterruptedException {
        return new MyRecordWriter(context);
    }
}
